#pragma once

#include "base/core/singleton.h"
#include "Common/AccountDefine.h"
#include "base/core/object_pool.h"
#include "ProtoBuffer/AllProtocol.h"
#include "Common/MessageDispatch/IMessageDispatch.h"
#include "Common/TeamDefine.h"

class Player;

//查询模块
class GQueryManager : public IServerMessageHandler, public ManualSingleton < GQueryManager >
{
public:
	bool 				Init();
	void 				UnInit();

	//////////////////////////////  IServerMessageHandler ////////////////////////////////////////////
	virtual void		onServerMessage(uint32_t actionId, RECV_PACKAGE &package);
	virtual const char* getServerHandlerDebugInfo(void){ return "GQueryManager::onServerMessage"; }

private:
	bool				OnCharacterDetailData(RECV_PACKAGE &package);
	bool				QueryCharacterdDetailInfo(CharIDType srcId, CharIDType dstId, WCCharacterDetailRsp& rsp);
	bool				QueryCharacterdPetInfo(CharIDType srcId, CharIDType dstId, WCCharacterDetailRsp& rsp);

public:
	GQueryManager();
	virtual ~GQueryManager();
};

#define g_MakeGQueryMgr() (GQueryManager::Instance())
#define g_GetGQueryMgr()  (GQueryManager::GetInstance())
#define g_DelGQueryMgr()  (GQueryManager::Destroy())